package thread;

public class ThreadInfoDemo {
    public static void main(String[] args) {
        Thread t=new Thread("nice"){
            public void run(){
               String name= this.getName();
                System.out.println(name);
                long id=this.getId();
                System.out.println(id);
                 int priority= this.getPriority();
                System.out.println(priority);
                boolean isInterrupted=this.isInterrupted();
                System.out.println("是否被中断");
                boolean isDeamon=this.isDaemon();
                System.out.println("判断是否守护线程"+isDeamon);
                boolean isAlive=this.isAlive();
                System.out.println("是否活着"+isAlive);
            }
        };
        t.start();
    }
}
